<%@page pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>图书管理系统-登录</title>
	<link href='${pageContext.request.contextPath}/common/css/login.css' rel='stylesheet' type='text/css'></link>
	<script type="text/javascript" src="${pageContext.request.contextPath}/common/js/login.js">	</script>
	<script type="text/javascript" >
	function logins(){
			if(document.form.userName.value.length<1){
				alert("用户名不能为空!");
				return false;
			}
			if(document.form.password.value.length<1){
				alert("密码不能为空！");
				return false;
			}
			if(document.form.token.value.length!=4){
				alert("验证码必须为四位！");
				return false;
			}
		}
		</script>
	</head>
<body>
	<center>
		<table width='778' height='74' border='0' cellpadding='0' cellspacing='0'>
			<tr>
				<td></td>
			</tr>
			<tr>
				<td width='136'><img src="${pageContext.request.contextPath}/common/images/title.gif" height="37" width="348"/></td>
			</tr>
		</table>
	</center>
<center>
<form name="form" action="${pageContext.request.contextPath}/login.do?method=login" method="post" onsubmit="return(logins());">
	<table class="font" cellspacing="0" cellpadding="0" align="center" border="0"  width="275" height="242">
		<tbody> 
			<tr><td>&nbsp;</td></tr>
			<tr height="30"> 
				<td colspan="3" align="left">
					${message}
				</td>
			</tr>
			<tr height="30"> 
				<td><span id=codes>&nbsp;&nbsp;帐&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</span>：</td>
				<td colspan="2" align="left">
					<input type="text" name="userName"/><br/>
				</td>
			</tr>
			<tr height="30"> 
				<td>&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码： </td>
				<td colspan="2" align="left">
					<input type="password" name="password"/> 
				</td>
			</tr>
			<tr height="30"> 
				<td>&nbsp;&nbsp;用户权限： </td>
				<td colspan="2" align="left">
					<input type="radio" name="purview" value="图书管理员" checked/>图书管理员
					<input type="radio" name="purview"  value="系统管理员 "/>系统管理员 
				</td>
			</tr>
			<tr height="30"> <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;验证码：</td>
				<td><input name="token" type="text"/></td>
				<td>
   				<img src="${pageContext.request.contextPath}/token/image.jpg" onclick="src='${pageContext.request.contextPath}/token/image.jpg'"/></td>
			</tr>
			<tr> 
				<td colspan="2"  align="center">
						<input type="submit" name="submit" value="登录"/> 
						<input type="reset" value="取消"/>
				</td>
			</tr>
		</tbody>
	</table>
</form>
</center>
</body>
</html>
